/**********************************************
这是代码自动生成的，如果重新生成，所做的改动将会丢失
系统:gpssolution
模块:系统平台
Itop.com 版权所有
生成者：Rabbit
生成时间:2012-8-8 13:48:58
***********************************************/

using System;
using System.Threading;
using System.ComponentModel;
namespace Itop.GpsCar.Model
{
    /// <summary>
    ///[carrier]业务实体类
    ///对应表名:carrier
    /// </summary>
    [Serializable]
    public class carrier
    {
        
        #region Private 成员
        private int _idcarrier=0; 
        private int _carrier_type=0; 
        private string _make=String.Empty; 
        private string _model=String.Empty; 
        private string _year=String.Empty; 
        private string _color=String.Empty; 
        private string _plate=String.Empty; 
        private string _vin=String.Empty; 
        private string _name=String.Empty; 
        private DateTime _timestamp=new DateTime(1900,1,1);   
        #endregion
  
  
        #region Public 成员
   
        /// <summary>
        /// 属性名称：idCarrier
        /// 属性描述：
        /// 字段信息：[idCarrier],INT UNSIGNED
        /// </summary>
        [Browsable(false)]
        [DisplayNameAttribute("")]
        public int idCarrier
        {
            get { return _idcarrier; }
            set
            {			
                if (_idcarrier as object == null || !_idcarrier.Equals(value))
                {
                    _idcarrier = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：carrier_type
        /// 属性描述：0 - undefined, 1 - car, 2 - motocycle, 3 - personal gps, 4 - cell phone, 5 - third party protocol
        /// 字段信息：[carrier_type],INT
        /// </summary>
        [DisplayNameAttribute("0 - undefined")]
        public int carrier_type
        {
            get { return _carrier_type; }
            set
            {			
                if (_carrier_type as object == null || !_carrier_type.Equals(value))
                {
                    _carrier_type = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：make
        /// 属性描述：
        /// 字段信息：[make],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string make
        {
            get { return _make; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[make]长度不能大于45!");
                if (_make as object == null || !_make.Equals(value))
                {
                    _make = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：model
        /// 属性描述：
        /// 字段信息：[model],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string model
        {
            get { return _model; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[model]长度不能大于45!");
                if (_model as object == null || !_model.Equals(value))
                {
                    _model = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：year
        /// 属性描述：
        /// 字段信息：[year],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string year
        {
            get { return _year; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[year]长度不能大于45!");
                if (_year as object == null || !_year.Equals(value))
                {
                    _year = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：color
        /// 属性描述：
        /// 字段信息：[color],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string color
        {
            get { return _color; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[color]长度不能大于45!");
                if (_color as object == null || !_color.Equals(value))
                {
                    _color = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：plate
        /// 属性描述：
        /// 字段信息：[plate],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string plate
        {
            get { return _plate; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[plate]长度不能大于45!");
                if (_plate as object == null || !_plate.Equals(value))
                {
                    _plate = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：vin
        /// 属性描述：
        /// 字段信息：[vin],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string vin
        {
            get { return _vin; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[vin]长度不能大于45!");
                if (_vin as object == null || !_vin.Equals(value))
                {
                    _vin = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：name
        /// 属性描述：
        /// 字段信息：[name],VARCHAR
        /// </summary>
        [DisplayNameAttribute("")]
        public string name
        {
            get { return _name; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 45)
                throw new Exception("[name]长度不能大于45!");
                if (_name as object == null || !_name.Equals(value))
                {
                    _name = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：timestamp
        /// 属性描述：
        /// 字段信息：[timestamp],TIMESTAMP
        /// </summary>
        [DisplayNameAttribute("")]
        public DateTime timestamp
        {
            get { return _timestamp; }
            set
            {			
                if (_timestamp as object == null || !_timestamp.Equals(value))
                {
                    _timestamp = value;
                }
            }			 
        }
  
        #endregion 
  
        #region 方法
        public static string Newid(){
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        public string CreateID(){
            Thread.Sleep(new TimeSpan(100000));//0.1毫秒
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        #endregion		
    }	
}
